import { Commit } from 'vuex'
const getters = {}
const state = {
  newCode: {},
  backId: ''
}
const mutations = {
  BASIC_DATA: (state: any, data: any) => {
    state.newCode = { ...state.newCode, ...data }
  },
  BACK_ID: (state: any, data:number) => {
    state.backId = data
    console.log(data, "数据")
  }
}
const actions = {
  basicData: (context: { commit: Commit }, data: any) => {
    context.commit('BASIC_DATA', data)
  },
  getBackId: (context: { commit: Commit }, data:number) => {
    context.commit('BACK_ID', data)
  }
}
export default {
  namespaced: true,
  getters,
  state,
  mutations,
  actions
}
